package com.example.demo.controller.gisController;

import com.example.demo.common.result.Result;
import com.example.demo.service.impl.UserImpl;
import com.example.demo.service.impl.gisImpl.ParkingImpl;
import com.example.demo.service.requestRvo.SimpleListRVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/parking")
public class parkingController {

    @Autowired
    ParkingImpl parkingImpl;

    @PostMapping("/list")
    public Result getListAll(@Validated @RequestBody SimpleListRVO vo){
        return parkingImpl.listAll(vo);
    }

    @PostMapping("/SortByStreet")
    public  Result sortBySteet( ){
        return  parkingImpl.getParkingLotStatistics();
    }

    @PostMapping("/GroupByType")
    public  Result groupByType( ){
        return  parkingImpl.getParkinggroupByType();
    }

}
